********************************************************************************
********************************************************************************
** Robustness analysis 9
** Heterogeneity in regard to religious course offerings
********************************************************************************
********************************************************************************

** Load data
use "$dataraw_path\data_ftna_publication.dta", clear


eststo rob9_1: areg gpa_ftna_core_sd private##religion female ///
	uncommon_name peers_score_core_sd peers_fail_share peers_as_share ///
	gpa_psle_other_sd, ///
	cl(school_id) a(group_id)

eststo rob9_2: areg gpa_ftna_core_sd private##bible_school female ///
	uncommon_name peers_score_core_sd peers_fail_share peers_as_share ///
	gpa_psle_other_sd, ///
	cl(school_id) a(group_id)

eststo rob9_3: areg gpa_ftna_core_sd private##islam_school female ///
	uncommon_name peers_score_core_sd peers_fail_share peers_as_share ///
	gpa_psle_other_sd, ///
	cl(school_id) a(group_id)

* Output
esttab rob9_* using "$out_path\tableb5.tex", replace se ///
stats(N r2, fmt(%12.3gc) labels("\(N\)" "\(R^2\)")) compress nomtitles ///
starlevels("" 0.01) substitute(\_ _) b(3) ///
/*KEEP*/k(1.private 1.religion 1.private#1.religion 1.bible_school ///
1.private#1.bible_school 1.islam_school 1.private#1.islam_school) ///
/*ORDER*/o(1.private 1.religion 1.private#1.religion 1.bible_school ///
1.private#1.bible_school 1.islam_school 1.private#1.islam_school) ///
/*LABELS*/varl(1.private "\$Private_s$" ///
1.religion "\$\textit{Religious courses}_s$" ///
1.private#1.religion "\$Private_s \times \textit{Religious courses}_s$" ///
1.bible_school "\$\textit{Bible course}_s$" ///
1.private#1.bible_school "\$Private_s \times \textit{Bible course}_s$" ///
1.islam_school "\$\textit{Islamic course}_s$" ///
1.private#1.islam_school "\$Private_s \times \textit{Islamic course}_s$")
